package org.bonorsoft.modules.control.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.bonorsoft.modules.control.entity.Address;
import com.baomidou.mybatisplus.extension.service.IService;
import org.bonorsoft.modules.control.entity.DoorCode;
import org.bonorsoft.modules.control.entity.House;
import org.bonorsoft.modules.control.entity.Unit;
import org.bonorsoft.modules.control.vo.AddressVo;
import org.bonorsoft.modules.control.vo.PopulationVo;
import org.bonorsoft.modules.control.vo.QrcodeVo;

import java.util.List;

/**
 * @Description: 走访地址
 * @Author: WilliamYe
 * @Date:   2021-01-30
 * @Version: V1.0
 */
public interface IAddressService extends IService<Address> {

    /**
     * 查出具有是否包含模板的list
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<AddressVo> paging(Page<Address> page, QueryWrapper<Address> queryWrapper);

    /**
     * 保存二维码base64编码
     * @param dzbm
     * @param qrcodeStr
     * @param link
     */
    int insertQrcode(String dzbm, String qrcodeStr, String link);

    int countQrcode(String dzbm);

    IPage<DoorCode> pageCode(Page<Address> page, QueryWrapper<Address> queryWrapper);

    void setCommonInfoByAdress(House house);

    void getCommonInfoByAdress(House house);

    void setUnitByAdress(Unit unit);

    void getUnitByAdress(Unit unit);

    void setPopulationByHouse(PopulationVo populationVo);

    void addPopuAndPhoto(List<PopulationVo> list);

    void getPopulationByHouse(PopulationVo populationVo);

    String getQrcode(String dzbm);

    List<QrcodeVo> getAllQrcode();
}
